package com.gzlww.tank;
import java.awt.*;

public class Blood {
	int x,y;
	int w=15,h=15;
	TankClient tc;
	int step=0;
	
	private boolean live=true;
	
	public boolean isLive() {
		return live;
	}

	public void setLive(boolean live) {
		this.live = live;
	}
	private int[][] pos={
			{230,450},{450,370},{120,410},{450,360},{361,250},{240,520}
	};
	
	public void draw(Graphics g)
	{
		if(!live) return;
		Color c=g.getColor();
		g.setColor(Color.MAGENTA);
		g.fillRect(x, y, w, h);
		g.setColor(c);
		move();
	}
	
	public void move()
	{
		step++;
		if(step == pos.length){
			step=0;
		}else{		
				x=pos[step][0];
				y=pos[step][0];
			}
	}
	public Rectangle getRect()
	{
		return new Rectangle(x,y,w,h);
	}
}
